package com.takeaway.dao.daolmpl;

import com.takeaway.dao.daointerface.SentCouponDao;
import com.takeaway.pojo.SentCoupon;
import com.takeaway.utils.JdbcUtils;

import java.util.ArrayList;

/**
 * @author 后台赖骏
 */
public class SentCouponImpl implements SentCouponDao {
    @Override
    public int insert(SentCoupon sentCoupon) throws Exception{
        return JdbcUtils.insert(sentCoupon);
    }

    @Override
    public int delete(Class<SentCoupon> clz, String[] checkField, Object... factor) throws Exception{
        return JdbcUtils.delete(clz,checkField,factor);
    }

    @Override
    public int update(SentCoupon sentCoupon) throws Exception{
        return JdbcUtils.update(sentCoupon);
    }

    @Override
    public SentCoupon selectSingle(SentCoupon sentCoupon, String[] checkFields, Object... factor) throws Exception{
        return (SentCoupon) JdbcUtils.selectSingle(sentCoupon,checkFields,factor);
    }

    @Override
    public ArrayList<SentCoupon> selectMore(Class<SentCoupon> clz, int begin, int listNum) throws Exception{
        return (ArrayList<SentCoupon>) JdbcUtils.selectMore(clz,begin,listNum);
    }

    @Override
    public ArrayList<SentCoupon> selectMore(Class<SentCoupon> clz, String[] checkField, Object... factor) throws Exception{
        return (ArrayList<SentCoupon>) JdbcUtils.selectMore(clz,checkField,factor);
    }
}
